<html>
<head><meta charset="utf-8"><title>adding Stream to stdlib · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html">adding Stream to stdlib</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197314777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197314777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197314777">(May 12 2020 at 18:02)</a>:</h4>
<p>So <span class="user-mention" data-user-id="243558">@Steven Fackler</span> opened PR <a href="https://github.com/rust-lang/rust/issues/72035">#72035</a>  to add <code>Stream</code> to the standard library.</p>



<a name="197316570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197316570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197316570">(May 12 2020 at 18:16)</a>:</h4>
<p>My first thought is: How sure are we that whatever special syntax we want to power <code>impl Stream</code> is compatible with that trait definition?</p>



<a name="197340821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197340821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197340821">(May 12 2020 at 21:17)</a>:</h4>
<p>do you mean "generators"?</p>



<a name="197340830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197340830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197340830">(May 12 2020 at 21:17)</a>:</h4>
<p>e.g., <code>gen fn</code> or something?</p>



<a name="197340855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197340855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197340855">(May 12 2020 at 21:17)</a>:</h4>
<p>Anyway, the more I think about it, the more it seems clear that we need an RFC</p>



<a name="197340886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197340886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197340886">(May 12 2020 at 21:18)</a>:</h4>
<p>(which I think would be a great place to record the answer to that question and some details)</p>



<a name="197340920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197340920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197340920">(May 12 2020 at 21:18)</a>:</h4>
<p>(that said, I don't see any problem, but it'd be worth writing out some details of how it might work)</p>



<a name="197340992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197340992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197340992">(May 12 2020 at 21:18)</a>:</h4>
<p>I was thinking that maybe we can do a bit of collaborative work on such an RFC in the wg-async-functions repository?</p>



<a name="197341210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197341210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197341210">(May 12 2020 at 21:20)</a>:</h4>
<p>Chiming in unprompted—what sort of design/syntax gets proposed for generators (e.g., <code>gen fn</code> for iterators; <code>async gen fn</code> for streams) <em>might</em> have interactions with <a href="https://internals.rust-lang.org/t/pre-rfc-lifecycle-trait/12311">https://internals.rust-lang.org/t/pre-rfc-lifecycle-trait/12311</a></p>



<a name="197342825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197342825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197342825">(May 12 2020 at 21:34)</a>:</h4>
<p>question is -- who wants to create first draft of that RFC :)</p>



<a name="197343195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197343195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197343195">(May 12 2020 at 21:37)</a>:</h4>
<p>Would adding a <code>gen</code> modifier to functions be an edition change?</p>



<a name="197343219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197343219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197343219">(May 12 2020 at 21:37)</a>:</h4>
<p>(asking because I have no idea what the scope _is_)</p>



<a name="197343282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197343282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197343282">(May 12 2020 at 21:38)</a>:</h4>
<p>(and i've enjoyed writing some of these RFCs)</p>



<a name="197345680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197345680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197345680">(May 12 2020 at 22:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="198819">David Barsky</span> <a href="#narrow/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib/near/197343195">said</a>:</p>
<blockquote>
<p>Would adding a <code>gen</code> modifier to functions be an edition change?</p>
</blockquote>
<p>it's a good point that we might want to reserve that keyword</p>



<a name="197345684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197345684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197345684">(May 12 2020 at 22:01)</a>:</h4>
<p>but by "that RFC" I meant "the stream rfc"</p>



<a name="197346106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197346106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197346106">(May 12 2020 at 22:05)</a>:</h4>
<p>Ah, I interpreted "the stream RFC" as <em>also</em> trying to figure out some of the syntax for some of the higher-level abstractions that make writing iterators or streams nicer</p>



<a name="197348504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197348504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197348504">(May 12 2020 at 22:30)</a>:</h4>
<p>No, I'd leave that out, but I think it's a good idea to discuss (with some hypothetical syntax) what interactions there would be</p>



<a name="197460703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197460703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197460703">(May 13 2020 at 19:03)</a>:</h4>
<p>I started an RFC draft</p>



<a name="197460712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197460712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197460712">(May 13 2020 at 19:03)</a>:</h4>
<p>but I forgot to open the PR, I think</p>



<a name="197460715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197460715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197460715">(May 13 2020 at 19:03)</a>:</h4>
<p>let me do that...</p>



<a name="197460839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197460839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197460839">(May 13 2020 at 19:04)</a>:</h4>
<p><a href="https://github.com/rust-lang/wg-async-foundations/pull/10">https://github.com/rust-lang/wg-async-foundations/pull/10</a></p>



<a name="197461005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/197461005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#197461005">(May 13 2020 at 19:05)</a>:</h4>
<p>ping  <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> and <span class="user-mention" data-user-id="256759">@boats</span> especially, I'd like to have y'all take a look at that <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="198107147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198107147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198107147">(May 19 2020 at 18:22)</a>:</h4>
<p>BTW, I think my plan here (cc <span class="user-mention" data-user-id="211722">@Yoshua Wuyts</span>, who left good comments recently) is to incorporate the suggested edits as </p>
<p>FIXME</p>
<p>and open a tracking issue</p>



<a name="198107162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198107162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198107162">(May 19 2020 at 18:22)</a>:</h4>
<p>since I'd prefer for this stream RFC to be more "joint work" than just me writing stuff</p>



<a name="198107167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198107167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198107167">(May 19 2020 at 18:22)</a>:</h4>
<p>/me also doesn't have time to do that much</p>



<a name="198107176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198107176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198107176">(May 19 2020 at 18:22)</a>:</h4>
<p>I'm going to see if I can get that done in 10 minut s:P</p>



<a name="198454346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454346">(May 22 2020 at 15:24)</a>:</h4>
<p>OK -- <span class="user-mention" data-user-id="211722">@Yoshua Wuyts</span>  -- so looking at the <a href="https://hackmd.io/KGq2k9igT-aHTRb0SutiFQ">stream RFC hackmd</a> ..</p>



<a name="198454354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454354">(May 22 2020 at 15:24)</a>:</h4>
<p>I put in the main points in the motivation, not sure if anything is missing from your POV</p>



<a name="198454413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454413">(May 22 2020 at 15:25)</a>:</h4>
<p>actually let me review the comments from the RFC thread again</p>



<a name="198454425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454425">(May 22 2020 at 15:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib/near/198107176">said</a>:</p>
<blockquote>
<p>I'm going to see if I can get that done in 10 minut s:P</p>
</blockquote>
<p>obviously I was not able to do this =)</p>



<a name="198454534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454534">(May 22 2020 at 15:26)</a>:</h4>
<p>I believe most of my comments were future-facing -- both generators and async iteration</p>



<a name="198454544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454544">(May 22 2020 at 15:26)</a>:</h4>
<p>which we just incorporated (:</p>



<a name="198454547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454547">(May 22 2020 at 15:26)</a>:</h4>
<p>I think the outline hits <span class="user-mention" data-user-id="127859">@Taylor Cramer</span>'s <a href="https://github.com/rust-lang/wg-async-foundations/pull/10#discussion_r424705450">points here</a> by and large</p>



<a name="198454603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454603">(May 22 2020 at 15:26)</a>:</h4>
<p>yeah, <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> mentioned the same, and I agree that's a key point -- of course there's also the matter of discussing a bit some of the questions around those</p>



<a name="198454613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454613">(May 22 2020 at 15:26)</a>:</h4>
<p>I think that probably belongs a bit later, not in the Motivation</p>



<a name="198454634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454634">(May 22 2020 at 15:27)</a>:</h4>
<p>but more  in the Reference  and Alternatives or whatver</p>



<a name="198454646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454646">(May 22 2020 at 15:27)</a>:</h4>
<p>makes sense</p>



<a name="198454822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198454822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198454822">(May 22 2020 at 15:28)</a>:</h4>
<p>OK, you raised <code>IntoStream</code> and <code>FromStream</code> for the future possibilities</p>



<a name="198455105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455105">(May 22 2020 at 15:31)</a>:</h4>
<p><span class="user-mention" data-user-id="211722">@Yoshua Wuyts</span> I just added these two points:</p>
<ul>
<li>examples of crates that are consuming streams?</li>
<li>examples of crates that are producing streams?</li>
</ul>



<a name="198455125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455125">(May 22 2020 at 15:31)</a>:</h4>
<p>not sure if you have any off the top of your head but leaving some notes would be helpful</p>



<a name="198455250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455250">(May 22 2020 at 15:32)</a>:</h4>
<p>also, hackmd <em>really</em> doesn't work well when I tile my windows :(</p>



<a name="198455270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455270">(May 22 2020 at 15:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib/near/198454822">said</a>:</p>
<blockquote>
<p>OK, you raised <code>IntoStream</code> and <code>FromStream</code> for the future possibilities</p>
</blockquote>
<p>yeah; those would be required for async iteration syntax. But also if we want to mirror <code>Iterator</code> and allow us to <code>collect</code> into various collections</p>



<a name="198455793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455793">(May 22 2020 at 15:37)</a>:</h4>
<p>omg hackmd is so slow what the heck</p>



<a name="198455942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455942">(May 22 2020 at 15:38)</a>:</h4>
<p>does future crate have something like <code>IntoStream</code> or <code>FromStream</code>?</p>



<a name="198455943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455943">(May 22 2020 at 15:38)</a>:</h4>
<p>hmm, the question of "consuming streams" is an interesting one -- I feel most crates I see take a single message, but are then called repeatedly</p>



<a name="198455968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198455968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198455968">(May 22 2020 at 15:38)</a>:</h4>
<p>e.g., for each thing in the stream?</p>



<a name="198456020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456020">(May 22 2020 at 15:38)</a>:</h4>
<p>yes exactly: "for each stream in tcp listener" is a common one</p>



<a name="198456204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456204">(May 22 2020 at 15:40)</a>:</h4>
<p>added it (:</p>



<a name="198456484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456484">(May 22 2020 at 15:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib/near/198455793">said</a>:</p>
<blockquote>
<p>does future crate have something like IntoStream or FromStream?</p>
</blockquote>
<p>it doesn't -- though it does have a <code>StreamExt::collect</code> method it takes different bounds than <code>Iterator::collect</code> does: <a href="https://docs.rs/futures/0.3.5/futures/stream/trait.StreamExt.html#method.collect">https://docs.rs/futures/0.3.5/futures/stream/trait.StreamExt.html#method.collect</a></p>



<a name="198456488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456488">(May 22 2020 at 15:42)</a>:</h4>
<p>ok  I moved a bunch of stuff to "future possibilities"</p>



<a name="198456507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456507">(May 22 2020 at 15:42)</a>:</h4>
<p>include some content (combinator methods) that was previously elsewhere</p>



<a name="198456539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456539">(May 22 2020 at 15:42)</a>:</h4>
<p><em>reading</em></p>



<a name="198456765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456765">(May 22 2020 at 15:44)</a>:</h4>
<p>I like the "convenience methods" section a lot</p>



<a name="198456858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456858">(May 22 2020 at 15:45)</a>:</h4>
<p>/me tries to remember async-iteration ..</p>



<a name="198456956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456956">(May 22 2020 at 15:46)</a>:</h4>
<p>I think the idea was to have some notation like <code>for.await x in ... </code> or maybe <code>for? x in ...</code> to handle the "iterate over result" thing ..</p>



<a name="198456973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198456973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198456973">(May 22 2020 at 15:46)</a>:</h4>
<p>shouldn't go into too many details anyway</p>



<a name="198457046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457046">(May 22 2020 at 15:46)</a>:</h4>
<p>(Did <span class="user-mention" data-user-id="256759">@boats</span> write a blog post about this?)</p>



<a name="198457070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457070">(May 22 2020 at 15:47)</a>:</h4>
<p>It'd be good to collect notes on it in the "Design notes" section of the wg-async-foundations repo</p>



<a name="198457078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457078">(May 22 2020 at 15:47)</a>:</h4>
<p>and then be able to link to that</p>



<a name="198457087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457087">(May 22 2020 at 15:47)</a>:</h4>
<p>I think they wrote something that touched on it, yes -- though not a full proposal</p>



<a name="198457104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457104">(May 22 2020 at 15:47)</a>:</h4>
<p>yeah I have memories</p>



<a name="198457133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457133">(May 22 2020 at 15:47)</a>:</h4>
<p>but I think they maybe promised a part 2 and it never arrived :) though we did discussin a lang-team meeting</p>



<a name="198457137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457137">(May 22 2020 at 15:47)</a>:</h4>
<p>something like that</p>



<a name="198457143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457143">(May 22 2020 at 15:47)</a>:</h4>
<p>anyway, I think what's up there is a decent-ish outline</p>



<a name="198457161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457161">(May 22 2020 at 15:48)</a>:</h4>
<p>I will probably push a new commit</p>



<a name="198457204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457204">(May 22 2020 at 15:48)</a>:</h4>
<p>and then merge the PR</p>



<a name="198457218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457218">(May 22 2020 at 15:48)</a>:</h4>
<p>because I can't tolerate editing in hackmd anymore</p>



<a name="198457228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457228">(May 22 2020 at 15:48)</a>:</h4>
<p>for some reason it is SO slow for me</p>



<a name="198457231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457231">(May 22 2020 at 15:48)</a>:</h4>
<p>(is it just me?)</p>



<a name="198457270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457270">(May 22 2020 at 15:48)</a>:</h4>
<p>main point for "why IntoStream as a trait" would be that if we want to support: <code>for x.await in y</code> + <code>for &amp;x.await in y</code> + <code>for &amp;mut x.await in y</code> we'd need to provide a way to implement these -- where the most plausible option would be to mirror iterator's from/into traits</p>



<a name="198457350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457350">(May 22 2020 at 15:49)</a>:</h4>
<p>I think I messed up that example haha -- lemme get it right in the hackmd</p>



<a name="198457355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457355">(May 22 2020 at 15:49)</a>:</h4>
<p>I wonder if there would be a way to support that which</p>



<a name="198457366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457366">(May 22 2020 at 15:49)</a>:</h4>
<p>doesn't pull items from the stream one at a time necessarily</p>



<a name="198457403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457403">(May 22 2020 at 15:49)</a>:</h4>
<p>sometimes I do wish we still had the version of <code>for</code> where the body was a closure</p>



<a name="198457473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457473">(May 22 2020 at 15:50)</a>:</h4>
<p>/me tries to remember what syntax we use for that</p>



<a name="198457500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457500">(May 22 2020 at 15:50)</a>:</h4>
<p>/me cannot</p>



<a name="198457528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457528">(May 22 2020 at 15:50)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">for</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">each</span><span class="w"> </span><span class="o">|</span><span class="n">item</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>something like that maybe...</p>



<a name="198457549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457549">(May 22 2020 at 15:50)</a>:</h4>
<p>wasn't that something about internal vs external iteration? -- believe boats mentioned it may still be possible on twitter?</p>



<a name="198457560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457560">(May 22 2020 at 15:51)</a>:</h4>
<p>but I'm out of my depth there haha</p>



<a name="198457591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457591">(May 22 2020 at 15:51)</a>:</h4>
<p>we could certainly still extend things in various ways</p>



<a name="198457629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457629">(May 22 2020 at 15:51)</a>:</h4>
<p>/me is still rooting for parallel iteration syntax someday</p>



<a name="198457639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457639">(May 22 2020 at 15:51)</a>:</h4>
<p>did you make whatever final edits you had in mind?</p>



<a name="198457653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457653">(May 22 2020 at 15:51)</a>:</h4>
<p>not yet!</p>



<a name="198457677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457677">(May 22 2020 at 15:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211722">Yoshua Wuyts</span> <a href="#narrow/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib/near/198457629">said</a>:</p>
<blockquote>
<p>/me is still rooting for parallel iteration syntax someday</p>
</blockquote>
<p>yeah I was thinking that if we did support it async, it would ideally work in sync, and somehow .. do something rayon-like...</p>



<a name="198457689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457689">(May 22 2020 at 15:51)</a>:</h4>
<p>ok</p>



<a name="198457755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457755">(May 22 2020 at 15:52)</a>:</h4>
<p>heck. yes.</p>



<a name="198457769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198457769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198457769">(May 22 2020 at 15:52)</a>:</h4>
<p>(to rayon-like_</p>



<a name="198458010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198458010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198458010">(May 22 2020 at 15:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay yes done!</p>



<a name="198458039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198458039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198458039">(May 22 2020 at 15:54)</a>:</h4>
<p>added the examples to IntoStream/FromStream</p>



<a name="198459278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198459278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198459278">(May 22 2020 at 16:03)</a>:</h4>
<p>I guess we don't have a <code>BoxFuture</code> alias in the standard library?</p>



<a name="198459344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198459344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198459344">(May 22 2020 at 16:03)</a>:</h4>
<p>I was wondering whether we would want this <a href="https://docs.rs/futures/0.3.5/futures/stream/type.BoxStream.html"><code>BoxStream</code></a> alias from the futures crate:</p>
<div class="codehilite"><pre><span></span><code><span class="k">type</span> <span class="nc">BoxStream</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Pin</span><span class="o">&lt;</span><span class="nb">Box</span><span class="o">&lt;</span><span class="k">dyn</span><span class="w"> </span><span class="n">Stream</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="na">&#39;a</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Send</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="198461793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198461793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198461793">(May 22 2020 at 16:21)</a>:</h4>
<p>Good q; I feel that <code>BoxFuture</code> is mostly useful since we're still missing <code>async fn</code> in traits. Rarely use it otherwise. I've never used <code>BoxStream</code>.</p>



<a name="198462009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198462009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198462009">(May 22 2020 at 16:22)</a>:</h4>
<p>Also suspect that once we integrate <code>IntoFuture</code> with <code>async/.await</code> it would remove many of the remaining uses of <code>BoxFuture</code>.</p>



<a name="198547703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198547703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198547703">(May 23 2020 at 19:06)</a>:</h4>
<blockquote>
<p>I feel that BoxFuture is mostly useful since we're still missing async fn in traits. Rarely use it otherwise. I've never used BoxStream.</p>
</blockquote>
<p>This might just be because you today <strong>have to</strong> write <code>Stream</code>s by hand instead of letting the compiler doing the job. So obviously type erasure is less necessary. In the same fashion pinning on <code>Stream</code>s is today barely necessary - although we we at least had some cases where a <code>Stream</code> was a hand-written wrapper around a <code>Future</code> generating source and stored that <code>Future</code> inside itself (e.g. in <a href="https://github.com/Matthias247/futures-intrusive/pull/12">https://github.com/Matthias247/futures-intrusive/pull/12</a>)</p>



<a name="198547719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198547719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198547719">(May 23 2020 at 19:06)</a>:</h4>
<p>I personally don't care too much about type aliases. Projects can add them theirself if they find it helpful</p>



<a name="198547985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198547985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198547985">(May 23 2020 at 19:15)</a>:</h4>
<p>Avoiding adding the alias makes things also less opinionated around whether <code>Send</code> gets added. I understand some people would love all async/await stuff being <code>Send</code>. But for some environments that is not possible, for others not desirable due to performance concerns</p>



<a name="198548244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198548244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198548244">(May 23 2020 at 19:22)</a>:</h4>
<p>One more general thought about <code>Stream</code>:<br>
I noticed that <code>Stream</code>s  are a bit weird to work with for anything that can yield an error (which IO does). Since there is no error type in <code>Stream</code>, the output item is <code>Result&lt;T, E&gt;</code> then. But that doesn't allow you to write:</p>
<div class="codehilite"><pre><span></span><code><span class="k">while</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stream</span><span class="p">.</span><span class="n">next</span><span class="p">().</span><span class="k">await</span><span class="o">?</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="c1">// End of iteration</span>
</code></pre></div>


<p>anymore, since the <code>Option</code> takes precendence. This shows up in the usage of the method as well as in the implementation. E.g. it feels wrong to return <code>Some(Err(e))</code> from <code>poll</code>  after you returned <code>None</code> before - but <code>Stream</code> kind of prefers it.</p>



<a name="198633430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198633430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Benjamin Saunders <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198633430">(May 25 2020 at 04:47)</a>:</h4>
<p>Regarding the "iterate over result" problem, I think the proposal detailed at <a href="https://internals.rust-lang.org/t/pre-rfc-generator-integration-with-for-loops/6625">https://internals.rust-lang.org/t/pre-rfc-generator-integration-with-for-loops/6625</a> is a very compelling approach as it allows resolution of the ambiguity of whether errors are permanent. I hope any approach taken here won't close the door on something like that in the future.</p>



<a name="198637817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198637817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Roland Kuhn <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198637817">(May 25 2020 at 06:35)</a>:</h4>
<p>There are lots of streams that cannot fail, so I’d argue that the stream itself should not carry an error type. The <code>while</code> loop problem could be fixed by using a different add-on than <code>.next()</code> for fallible streams that returns <code>Result&lt;Option&lt;T&gt;, E&gt;</code> — and I agree that that syntax would be quite pleasant for consuming such streams.</p>



<a name="198767094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/198767094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#198767094">(May 26 2020 at 14:10)</a>:</h4>
<p>One thing I was thinking about over the weekend:</p>
<p>It might make sense to include a few convenience methods -- most notably, the trait as proposed doesn't even have a <code>next</code> method, you'd have to get that particular method from <code>FutureExt</code>. It seems like it's quite difficult to use without even a <code>next</code> method.</p>



<a name="199223340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199223340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199223340">(May 29 2020 at 23:14)</a>:</h4>
<p>I think I finally have enough contact to create a second draft of the draft rfc for adding stream to stdlib. Expect more questions here over the next week :)</p>



<a name="199223699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199223699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199223699">(May 29 2020 at 23:21)</a>:</h4>
<p>One question on <a href="https://github.com/rust-lang/wg-async-foundations/blob/master/rfc-drafts/stream.md">https://github.com/rust-lang/wg-async-foundations/blob/master/rfc-drafts/stream.md</a></p>
<p>"We eventually want dedicated syntax for working with streams, which will require a shared trait" - I'm having a bit of trouble parsing this. Is the trait shareable? Is it shared between the futures crate and std lib? Or is there another meaing?</p>



<a name="199224015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199224015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steven Fackler <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199224015">(May 29 2020 at 23:26)</a>:</h4>
<p>To have dedicated syntax for streams like we do for Future, the Stream trait needs to be "flagged" to the compiler as the special stream trait</p>



<a name="199224028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199224028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199224028">(May 29 2020 at 23:26)</a>:</h4>
<p>ah</p>



<a name="199224041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199224041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steven Fackler <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199224041">(May 29 2020 at 23:26)</a>:</h4>
<p>That's the <code>#[lang = "future_trait"]</code> annotation on Future: <a href="https://doc.rust-lang.org/src/core/future/future.rs.html#29">https://doc.rust-lang.org/src/core/future/future.rs.html#29</a></p>



<a name="199224048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199224048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199224048">(May 29 2020 at 23:26)</a>:</h4>
<p>ty!</p>



<a name="199420647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199420647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199420647">(Jun 01 2020 at 20:45)</a>:</h4>
<p>Working on the RFC this week - currently researching how other languages (including Ruby, node, and some others) handle streams in the context of async/await</p>



<a name="199436986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199436986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199436986">(Jun 01 2020 at 23:51)</a>:</h4>
<p>One question re: the summary on <a href="https://github.com/rust-lang/wg-async-foundations/blob/master/rfc-drafts/stream.md">https://github.com/rust-lang/wg-async-foundations/blob/master/rfc-drafts/stream.md</a></p>
<ul>
<li>
<p>I understand the first part "Introduce the <code>Stream</code> trait into the standard library, using the<br>
design from <code>futures</code>"</p>
</li>
<li>
<p>I'm not sure what this second part means "Redirect the futures-stream definition to the<br>
standard library."</p>
</li>
</ul>



<a name="199438277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199438277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steven Fackler <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199438277">(Jun 02 2020 at 00:15)</a>:</h4>
<p>The futures crate would delete its Stream definition and use <code>pub use core::stream::Stream</code> instead.</p>



<a name="199447928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199447928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199447928">(Jun 02 2020 at 03:49)</a>:</h4>
<blockquote>
<p>currently researching how other languages (including Ruby, node, and some others) handle streams in the context of async/await</p>
</blockquote>
<p>The only other language I'm aware of that has an async iterable is C# with <code>IAsyncEnumerable </code>. node streams are very different - they just share the name.  Kotlin has flows, but  they seem more like C# generators and not async iterables. But then you can also just write <code>suspend () -&gt; Option&lt;T&gt;</code> as a type and have essentially the same.</p>



<a name="199498697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199498697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199498697">(Jun 02 2020 at 14:24)</a>:</h4>
<p>Scala's FS2 (<a href="https://github.com/functional-streams-for-scala/fs2">https://github.com/functional-streams-for-scala/fs2</a>) is stream-like, but given Scala has do-notation/for-comprehensions, it's less applicable for Rust IMO.</p>



<a name="199522927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199522927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199522927">(Jun 02 2020 at 17:05)</a>:</h4>
<p>Node streams support <code>for await (const buf of stream) { ... }</code> through the <code>asyncIterator</code> Symbol: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator</a> -- adding this to Node streams was a recent-ish addition (proposed in 2016, believe stabilized in 2017ish)</p>



<a name="199523062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199523062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199523062">(Jun 02 2020 at 17:06)</a>:</h4>
<p><code>asyncIterator</code> is a counterpart to the <code>iterator</code> symbol used for <code>for (const x in y) { ... }</code> syntax: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator</a></p>



<a name="199525661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199525661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199525661">(Jun 02 2020 at 17:28)</a>:</h4>
<p>Oh ok. But these are not really the classical node Streams (<a href="https://nodejs.org/api/stream.html">https://nodejs.org/api/stream.html</a>), which are more like buffered byte streams that originally were built for a callback based API. That's why  I assumed them to be very different</p>



<a name="199525900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199525900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199525900">(Jun 02 2020 at 17:30)</a>:</h4>
<p><span class="user-mention" data-user-id="204219">@Matthias247</span> node streams support both "buffer mode" and "object mode" -- the former is comparable to <code>Stream&lt;Item = Vec&lt;u8&gt;&gt;</code>, the latter to <code>Stream&lt;Item = T&gt;</code> -- both types can be iterated over using <code>for await</code> loops.</p>



<a name="199526006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199526006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199526006">(Jun 02 2020 at 17:30)</a>:</h4>
<p>I mean, they're not <em>identical</em> to Rust streams -- but conceptually they're close enough that they seem worthy of mention.</p>



<a name="199526048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199526048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199526048">(Jun 02 2020 at 17:31)</a>:</h4>
<p>Does "object-mode" still have built-in buffering?</p>



<a name="199526208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199526208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199526208">(Jun 02 2020 at 17:32)</a>:</h4>
<p>buffering in Node is a complex topic, heh -- but object mode streams definitely also support backpressure</p>



<a name="199526276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199526276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Yoshua Wuyts <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199526276">(Jun 02 2020 at 17:32)</a>:</h4>
<p>example of iteration using Node streams: <a href="https://nodejs.org/api/stream.html#stream_readable_symbol_asynciterator">https://nodejs.org/api/stream.html#stream_readable_symbol_asynciterator</a></p>



<a name="199526713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199526713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthias247 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199526713">(Jun 02 2020 at 17:36)</a>:</h4>
<p>if it's just an async iterable then you automatically have backpressure. And you also can never have "an object being lost in the Streams buffer". If the Stream is buffered by the implementation (like the byte-based node Streams are), then you explicitly need to care about backpressure</p>



<a name="199572147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199572147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199572147">(Jun 03 2020 at 01:35)</a>:</h4>
<p>Still very much a work in progress - but I've started fleshing out the "Future Possibilities" section of the RFC based on conversations here and on external research <a href="https://github.com/rust-lang/wg-async-foundations/pull/13">https://github.com/rust-lang/wg-async-foundations/pull/13</a></p>



<a name="199935353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/199935353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#199935353">(Jun 05 2020 at 21:19)</a>:</h4>
<p>Merged <a href="https://github.com/rust-lang/wg-async-foundations/pull/13">https://github.com/rust-lang/wg-async-foundations/pull/13</a> (after approval from Niko). Added a few "to do" items for the next iteration to <a href="https://github.com/rust-lang/wg-async-foundations/issues/12#issuecomment-639824377">https://github.com/rust-lang/wg-async-foundations/issues/12#issuecomment-639824377</a></p>



<a name="200261119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261119">(Jun 09 2020 at 17:09)</a>:</h4>
<p><span class="user-mention" data-user-id="225192">@Nell Shamrell-Harrington</span> so I was wondering</p>



<a name="200261152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261152">(Jun 09 2020 at 17:09)</a>:</h4>
<p>maybe we should take advantage of this time to discuss a bit the "attached stream forward compatibility story"?</p>



<a name="200261206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261206">(Jun 09 2020 at 17:10)</a>:</h4>
<p>sounds good!</p>



<a name="200261243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261243">(Jun 09 2020 at 17:10)</a>:</h4>
<p>I'm not sure if anyone (cc <span class="user-mention" data-user-id="127859">@Taylor Cramer</span>) has links to previous places this has been discussed</p>



<a name="200261269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261269">(Jun 09 2020 at 17:10)</a>:</h4>
<p>here is a <a href="https://hackmd.io/gHqlQBTiSrexwb-ppRPn-A">hackmd document</a> we can use to take some notes</p>



<a name="200261315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261315">(Jun 09 2020 at 17:11)</a>:</h4>
<p>I can definitely see an issue if people feel they will need to re-write their streams to be attached streams when we add the functionality (if we don't add it right now)</p>



<a name="200261410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261410">(Jun 09 2020 at 17:11)</a>:</h4>
<p>well so</p>



<a name="200261506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261506">(Jun 09 2020 at 17:12)</a>:</h4>
<p>I think the one point is that it should be possible to write a bridge such that every stream becomes an attached stream</p>



<a name="200261545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261545">(Jun 09 2020 at 17:12)</a>:</h4>
<p>(side note, that reminds me though that we should discuss whether we can move the <code>fn next</code> combinator into the stream trait we stabilize)</p>



<a name="200261554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261554">(Jun 09 2020 at 17:12)</a>:</h4>
<p>gotcha</p>



<a name="200261852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261852">(Jun 09 2020 at 17:15)</a>:</h4>
<p>So I would say this</p>



<a name="200261862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261862">(Jun 09 2020 at 17:15)</a>:</h4>
<p>The <em>producer</em> side is not such a worry</p>



<a name="200261871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261871">(Jun 09 2020 at 17:15)</a>:</h4>
<p>The <em>consumer</em> side is a bit more interesting</p>



<a name="200261898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261898">(Jun 09 2020 at 17:15)</a>:</h4>
<p>You probably want to <em>consume</em> an attached stream if you can, to give your caller more flexibility</p>



<a name="200261962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261962">(Jun 09 2020 at 17:16)</a>:</h4>
<p>Notably if we had <code>for</code>-loop integration, that would be "attached compatible"</p>



<a name="200261974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261974">(Jun 09 2020 at 17:16)</a>:</h4>
<p>i.e., because it processes one item at a time before going to the next</p>



<a name="200261996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200261996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200261996">(Jun 09 2020 at 17:16)</a>:</h4>
<p>but if you have instead a desire to spawn off parallel work for each item on the stream (as is, perhaps, common)</p>



<a name="200262009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262009">(Jun 09 2020 at 17:16)</a>:</h4>
<p>then you would need a detached <code>Stream</code> anyhow</p>



<a name="200262495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262495">(Jun 09 2020 at 17:21)</a>:</h4>
<p>there may be coherence implications</p>



<a name="200262503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262503">(Jun 09 2020 at 17:21)</a>:</h4>
<p>what else should we discuss on this?</p>



<a name="200262504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262504">(Jun 09 2020 at 17:21)</a>:</h4>
<p>maybe we should prototype it a bit</p>



<a name="200262515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262515">(Jun 09 2020 at 17:21)</a>:</h4>
<p>can do</p>



<a name="200262605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262605">(Jun 09 2020 at 17:22)</a>:</h4>
<p>I think a key point is that the "bridge impl" must be added at the same time that <code>AttachedStream</code> is created</p>



<a name="200262613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262613">(Jun 09 2020 at 17:22)</a>:</h4>
<p>but that's ok</p>



<a name="200262642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262642">(Jun 09 2020 at 17:22)</a>:</h4>
<p><span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="200262644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262644">(Jun 09 2020 at 17:22)</a>:</h4>
<p>(it's a breaking change to add blanket impls for a pre-existing trait)</p>



<a name="200262711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262711">(Jun 09 2020 at 17:22)</a>:</h4>
<p>in particular i'm wondering if there would be a problem because</p>



<a name="200262716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262716">(Jun 09 2020 at 17:22)</a>:</h4>
<p>maybe we have something like</p>



<a name="200262738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262738">(Jun 09 2020 at 17:22)</a>:</h4>
<p><code>impl&lt;S&gt; Stream for Box&lt;S&gt; where S: Stream</code></p>



<a name="200262741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262741">(Jun 09 2020 at 17:22)</a>:</h4>
<p>and</p>



<a name="200262751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262751">(Jun 09 2020 at 17:23)</a>:</h4>
<p><code>impl&lt;S&gt; AttachedStream for Box&lt;S&gt; where S: AttachedStream</code></p>



<a name="200262779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262779">(Jun 09 2020 at 17:23)</a>:</h4>
<p>which seems to offer two routes to implement <code>AttachedStream</code> for <code>Box&lt;impl Stream&gt;</code></p>



<a name="200262852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262852">(Jun 09 2020 at 17:23)</a>:</h4>
<p>of course they're equivalent, but the compiler doesn't know that</p>



<a name="200262960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262960">(Jun 09 2020 at 17:24)</a>:</h4>
<p>this perhaps suggests that one would want an explicit "stream-to-attached stream" conversion, or else a solution to this sort of problem</p>



<a name="200262989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262989">(Jun 09 2020 at 17:24)</a>:</h4>
<p>that makes sense</p>



<a name="200262994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200262994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200262994">(Jun 09 2020 at 17:24)</a>:</h4>
<p>the latter is appealing as this is a problem that arises in other cases</p>



<a name="200263008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263008">(Jun 09 2020 at 17:24)</a>:</h4>
<p>but of course .. it's tricky :)</p>



<a name="200263174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263174">(Jun 09 2020 at 17:26)</a>:</h4>
<p>(my goal here is just to try and catalog all the complications and considerations -- personally I still feel we should move forward, primarily because of the "this all applies equally well to iterator" situation)</p>



<a name="200263237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263237">(Jun 09 2020 at 17:26)</a>:</h4>
<p>(it would be interesting if there were any aspect that made it distinct from iterator in some way)</p>



<a name="200263363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263363">(Jun 09 2020 at 17:27)</a>:</h4>
<p>Sounds like some prototyping is indeed in order</p>



<a name="200263374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263374">(Jun 09 2020 at 17:27)</a>:</h4>
<p>I can work on that this week :)</p>



<a name="200263429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263429">(Jun 09 2020 at 17:28)</a>:</h4>
<p>OK, I put some notes at the end of <a href="https://hackmd.io/gHqlQBTiSrexwb-ppRPn-A">the hackmd</a></p>



<a name="200263582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200263582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200263582">(Jun 09 2020 at 17:28)</a>:</h4>
<p>thank you!</p>



<a name="200304674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200304674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200304674">(Jun 09 2020 at 23:37)</a>:</h4>
<p>As a drive by comment; is an attached stream the moral equivalent of a streaming iterator? If so, don’t you want to take advantage of calling it a streaming stream? 😅</p>



<a name="200305474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200305474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200305474">(Jun 09 2020 at 23:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> niko's been using "attached" terminology for both iterator and stream lately, I think</p>



<a name="200305494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200305494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200305494">(Jun 09 2020 at 23:49)</a>:</h4>
<p>for that exact reason.. "streaming stream" is confusing :)</p>



<a name="200305962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200305962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200305962">(Jun 09 2020 at 23:57)</a>:</h4>
<p>But it is the same concept? Maybe I’ll have to ruminate on alternate terms that resonate more.</p>



<a name="200306065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200306065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200306065">(Jun 09 2020 at 23:58)</a>:</h4>
<p>yeah the concepts are the same</p>



<a name="200306071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200306071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200306071">(Jun 09 2020 at 23:58)</a>:</h4>
<p>there was some discussion of the naming recently in <a href="#narrow/stream/187312-wg-async-foundations/topic/for-await.20loops">https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/for-await.20loops</a></p>



<a name="200423308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200423308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200423308">(Jun 10 2020 at 14:29)</a>:</h4>
<p>I would also apply "attached" to async closures</p>



<a name="200423393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200423393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200423393">(Jun 10 2020 at 14:30)</a>:</h4>
<p>and I don't know that "streaming" makes sense there</p>



<a name="200424013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200424013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200424013">(Jun 10 2020 at 14:34)</a>:</h4>
<p>that said I still feel like there should be some terminology around whether the iterator/stream <em>transfers</em> its items or <em>lends</em> them</p>



<a name="200424051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200424051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200424051">(Jun 10 2020 at 14:34)</a>:</h4>
<p>hmm I wonder if that's alternative I was looking for? a <code>LendingIterator</code> and <code>LendingStream</code>?</p>



<a name="200425340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425340">(Jun 10 2020 at 14:42)</a>:</h4>
<p>Anyway <span class="user-mention" data-user-id="116883">@tmandry</span> saw your comment on GitHub -- It seems like the real question here is whether we are open to trying to bridge the (pre-existing and orthogonal) coherence challenges of having a "bridged trait". One other point is that I don't think we have a notation, given an attached/lending stream, for saying "the item here does not use its <code>'a</code> parameter".</p>



<a name="200425355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425355">(Jun 10 2020 at 14:43)</a>:</h4>
<p>well, we do have a notation, but it's awkward</p>



<a name="200425359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425359">(Jun 10 2020 at 14:43)</a>:</h4>
<p>i.e., you could write</p>



<a name="200425402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425402">(Jun 10 2020 at 14:43)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="n">S</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">S</span>: <span class="nc">LendingStream</span><span class="o">&lt;</span><span class="n">Item</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">U</span><span class="o">&gt;</span><span class="w"></span>
</code></pre></div>



<a name="200425465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425465">(Jun 10 2020 at 14:43)</a>:</h4>
<p>here, the <code>'a</code> in <code>Item</code> is not in scope for <code>U</code>, so clearly this is not truly a lending stream</p>



<a name="200425521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425521">(Jun 10 2020 at 14:44)</a>:</h4>
<p>(so if I'm confusing by changing terminology, I'm trying it on for size)</p>



<a name="200425631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200425631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200425631">(Jun 10 2020 at 14:44)</a>:</h4>
<p>anyway, I think that example alone is somewhat motivating to me -- i.e., it's a useful and important case to be able to talk about streams that are not lending without having to use extra type parameters and notations. Not to mention that it highlights that there are a number of smaller size ergonomic challenges around GAts we're going to have to overcome at some point.</p>



<a name="200460302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200460302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200460302">(Jun 10 2020 at 18:54)</a>:</h4>
<p>hmm. solving that does seem challenging</p>



<a name="200460328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200460328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200460328">(Jun 10 2020 at 18:54)</a>:</h4>
<p>I like <code>Lending</code></p>



<a name="200473024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/200473024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#200473024">(Jun 10 2020 at 20:37)</a>:</h4>
<p>I also like lending</p>



<a name="203142492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203142492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203142492">(Jul 07 2020 at 18:42)</a>:</h4>
<p>Work on the latest draft of the Async Streaming RFC is largely complete <a href="https://github.com/rust-lang/wg-async-foundations/pull/15/files">https://github.com/rust-lang/wg-async-foundations/pull/15/files</a></p>
<p>The one remaining "to do" I have from the previous draft is "more information on Generators" - would anyone mind providing some context about this for me? What kind of information should be in the RFC?</p>



<a name="203151103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203151103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203151103">(Jul 07 2020 at 19:48)</a>:</h4>
<p>Marked the PR as "Ready to Review"</p>



<a name="203202511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203202511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203202511">(Jul 07 2020 at 21:02)</a>:</h4>
<p>hmm</p>



<a name="203202516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203202516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203202516">(Jul 07 2020 at 21:02)</a>:</h4>
<p>good question!</p>



<a name="203202537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203202537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203202537">(Jul 07 2020 at 21:02)</a>:</h4>
<p>I think we want to avoid going into too much detail here</p>



<a name="203202548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203202548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203202548">(Jul 07 2020 at 21:02)</a>:</h4>
<p>I think what I imagined though is something like saying:</p>



<a name="203203041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203203041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203203041">(Jul 07 2020 at 21:06)</a>:</h4>
<p>thinking out loud:</p>
<p>we are likely going to want to support <em>something</em> like</p>
<div class="codehilite"><pre><span></span><code><span class="n">gen</span><span class="w"> </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Value</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kr">yield</span><span class="w"> </span><span class="n">value</span><span class="p">;</span><span class="w"> </span><span class="c1">// something of type Value</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>which after desugaring would result in a function like <code>fn foo() -&gt; impl Iterator&lt;Item = Value&gt;</code>, and similarly we are going to want</p>
<div class="codehilite"><pre><span></span><code><span class="k">async</span><span class="w"> </span><span class="n">gen</span><span class="w"> </span><span class="k">fn</span> <span class="nf">foo</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Value</span><span class="w"></span>
</code></pre></div>


<p>to get a <code>fn foo() -&gt; impl Stream&lt;Item = Value&gt;</code>, and we could then sketch briefly how that would work.</p>
<p>We might then discuss what it would mean if had "lending streams" -- basically, from a syntax perspective, they'd be able to do <code>yield &amp;foo</code> -- but also the questions around backwards compatibility that it raises (which I at least haven't tried to write-up...).</p>
<p>In particular:</p>
<ul>
<li>if we introduce <code>-&gt; Stream</code> first, we'd have to permit <code>LendingStream</code> later somehow (that's an interesting question how we could do that)</li>
<li>if we wait and introduce <code>-&gt; LendingStream</code>, then we'd have to figure out how to convert a <code>LendingStream</code> into a <code>Stream</code> seamlessly</li>
</ul>
<p>But note that we <em>obviously</em> want one that works for <code>Iterator</code> (because that is a wide-spread abstraction), so the first approach is kind of a problem we'll have regardless... anyway ,don't have time to dig too deply just now</p>



<a name="203203066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203203066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203203066">(Jul 07 2020 at 21:06)</a>:</h4>
<p>but basically I would want to enumerate the various options we have here and how they interact with having a stable stream trait (versus waiting)</p>



<a name="203203745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203203745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203203745">(Jul 07 2020 at 21:12)</a>:</h4>
<p>(personally I have to say that I am <del>mildly</del> skeptical of blocking too much on lending-iterator and lending-stream, it seems like iterator has gotten us awfully far and I expect stream will too, and I'm worried that by blocking on things we'll wind up waiting an awfully long time...)</p>



<a name="203205016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203205016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203205016">(Jul 07 2020 at 21:24)</a>:</h4>
<p>thank you!</p>



<a name="203206457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203206457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203206457">(Jul 07 2020 at 21:36)</a>:</h4>
<p>Added into the RFC draft!</p>



<a name="203539249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203539249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203539249">(Jul 10 2020 at 18:04)</a>:</h4>
<p>Any objections to me </p>
<p>1) Merging <a href="https://github.com/rust-lang/wg-async-foundations/pull/15">https://github.com/rust-lang/wg-async-foundations/pull/15</a><br>
2) Once it is merged, opening the RFC on the rfcs repo? (though I might wait until Mon to do it so it doesn't get lost over the weekend, I'm expecting a lot of discussion on this one)</p>



<a name="203541309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/203541309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#203541309">(Jul 10 2020 at 18:22)</a>:</h4>
<blockquote>
<p>I'm expecting a lot of discussion</p>
</blockquote>
<p>I've already heard "should we call it <code>Stream</code>" <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="204141175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204141175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204141175">(Jul 16 2020 at 20:52)</a>:</h4>
<p>Alright, I believe I've incorporated all the final feedback to <a href="https://github.com/rust-lang/wg-async-foundations/pull/15">https://github.com/rust-lang/wg-async-foundations/pull/15</a></p>



<a name="204141222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204141222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204141222">(Jul 16 2020 at 20:52)</a>:</h4>
<p>(in some cases, I linked directly to the relevant discussion on the draft)</p>



<a name="204141261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204141261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204141261">(Jul 16 2020 at 20:52)</a>:</h4>
<p>Any objections to me opening this up on rust/rfcs?</p>



<a name="204152177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204152177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204152177">(Jul 16 2020 at 22:40)</a>:</h4>
<p>I'm fine with it! There's still some ongoing discussion around the <code>next</code> method, not sure if <span class="user-mention" data-user-id="116009">@nikomatsakis</span> wants to figure that out before opening or not.</p>



<a name="204210767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204210767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204210767">(Jul 17 2020 at 14:15)</a>:</h4>
<p>I'm not sure either :)</p>



<a name="204210978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204210978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204210978">(Jul 17 2020 at 14:17)</a>:</h4>
<p>I think I dont' doubt the outcome but I'd still like to haev a crisper understanding of the tradeoffs/implications</p>



<a name="204244051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244051">(Jul 17 2020 at 18:49)</a>:</h4>
<p>What if we were to merge the PR as it is, then open a new issue and list anything that is blocking it from being opened as an RFC? (I'm unsure what is blocking it, but am open to suggestions)</p>



<a name="204244206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244206">(Jul 17 2020 at 18:50)</a>:</h4>
<p>and, if we can't think of any blockers, I will plan on opening the formal RFC on Tuesday :)</p>



<a name="204244524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244524">(Jul 17 2020 at 18:53)</a>:</h4>
<p>I'm fine with that. We might want to open an issue about <code>next</code> and pinning, and can discuss there if we think it should be further resolved before opening the RFC. (And maybe keep the technical discussion in the existing thread? I hate splitting discussions up like this)</p>



<a name="204244580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244580">(Jul 17 2020 at 18:53)</a>:</h4>
<p>We can also keep the PR open and open an issue listing blockers for opening the RFC</p>



<a name="204244668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244668">(Jul 17 2020 at 18:54)</a>:</h4>
<p>I just want us to get concrete about what further work needs to be done before this can be opened to the community - it seems a bit nebulous atm</p>



<a name="204244704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244704">(Jul 17 2020 at 18:54)</a>:</h4>
<p>I will go ahead and create the issue and leave the PR open</p>



<a name="204244795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244795">(Jul 17 2020 at 18:55)</a>:</h4>
<p>fwiw, merging the PR is not an issue for me.. discussion can continue to happen in those places whether the PR is merged or not, and we can always open another PR</p>



<a name="204244861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204244861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204244861">(Jul 17 2020 at 18:55)</a>:</h4>
<p>ah - there is already a related issue</p>



<a name="204245090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204245090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204245090">(Jul 17 2020 at 18:57)</a>:</h4>
<p>Alright - added a comment to <a href="https://github.com/rust-lang/wg-async-foundations/issues/12#issuecomment-660284455">https://github.com/rust-lang/wg-async-foundations/issues/12#issuecomment-660284455</a></p>



<a name="204245180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204245180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204245180">(Jul 17 2020 at 18:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>, etc, - could you please list any concerns you have that might block the RFC from being opened there?</p>



<a name="204245331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204245331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204245331">(Jul 17 2020 at 18:59)</a>:</h4>
<p>(list them in the linked issue, that is)</p>



<a name="204264347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204264347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204264347">(Jul 17 2020 at 21:56)</a>:</h4>
<p>done</p>



<a name="204490298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204490298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204490298">(Jul 20 2020 at 22:13)</a>:</h4>
<p>on this topic, should we make a (probably a wg-async-foundations/stream-trait stream ?</p>



<a name="204490315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204490315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204490315">(Jul 20 2020 at 22:13)</a>:</h4>
<p>seems like some of the conversation from the PR would be a better fit for Zulip</p>



<a name="204570070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204570070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204570070">(Jul 21 2020 at 16:27)</a>:</h4>
<p>sounds good!</p>



<a name="204570143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/adding%20Stream%20to%20stdlib/near/204570143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/adding.20Stream.20to.20stdlib.html#204570143">(Jul 21 2020 at 16:28)</a>:</h4>
<p>not sure I have the permissions to add a stream</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>